home *** CD-ROM | disk | FTP | other *** search
Wrap
diff -cr --new-file gdb-4.12/bfd/config/m68k-linux.mh gdb-4.12.new/bfd/config/m68k-linux.mh *** gdb-4.12/bfd/config/m68k-linux.mh Wed Dec 31 19:00:00 1969 --- gdb-4.12.new/bfd/config/m68k-linux.mh Thu Mar 10 09:44:19 1994 *************** *** 0 **** --- 1,2 ---- + HDEFINES=-DTRAD_CORE + HDEPFILES=trad-core.o diff -cr --new-file gdb-4.12/bfd/config/m68k-unknown-linux.mt gdb-4.12.new/bfd/config/m68k-unknown-linux.mt *** gdb-4.12/bfd/config/m68k-unknown-linux.mt Wed Dec 31 19:00:00 1969 --- gdb-4.12.new/bfd/config/m68k-unknown-linux.mt Thu Mar 10 09:14:42 1994 *************** *** 0 **** --- 1,4 ---- + # Target: Motorola m68k running linux using a.out + + DEFAULT_VECTOR=m68klinux_vec + SELECT_ARCHITECTURES=bfd_m68k_arch diff -cr --new-file gdb-4.12/bfd/configure.host gdb-4.12.new/bfd/configure.host *** gdb-4.12/bfd/configure.host Thu Feb 3 11:46:47 1994 --- gdb-4.12.new/bfd/configure.host Thu Mar 10 10:28:53 1994 *************** *** 61,66 **** --- 61,67 ---- m68*-cbm-sysv4*) my_host=amix ;; m68*-hp-hpux*) my_host=hp300 ;; m68*-hp-bsd*) my_host=hp300bsd ;; + m68*-*-linux*) my_host=m68k-linux ;; m68*-*-lynxos*) my_host=m68klynx ;; m68*-motorola-sysv*) my_host=delta68 ;; m68*-sony-*) my_host=news ;; diff -cr --new-file gdb-4.12/bfd/configure.in gdb-4.12.new/bfd/configure.in *** gdb-4.12/bfd/configure.in Thu Feb 3 12:00:54 1994 --- gdb-4.12.new/bfd/configure.in Thu Mar 10 09:14:42 1994 *************** *** 179,184 **** --- 179,185 ---- icoff_big_vec) tb="$tb coff-i960.o" ;; icoff_little_vec) tb="$tb coff-i960.o" ;; ieee_vec) tb="$tb ieee.o" ;; + m68klinux_vec) tb="$tb m68klinux.o aout32.o stab-syms.o" ;; m68kcoff_vec) tb="$tb coff-m68k.o" ;; m68kcoffun_vec) tb="$tb coff-u68k.o coff-m68k.o" ;; m68klynx_aout_vec) tb="$tb m68klynx.o lynx-core.o aout32.o stab-syms.o" ;; diff -cr --new-file gdb-4.12/bfd/hosts/m68k-linux.h gdb-4.12.new/bfd/hosts/m68k-linux.h *** gdb-4.12/bfd/hosts/m68k-linux.h Wed Dec 31 19:00:00 1969 --- gdb-4.12.new/bfd/hosts/m68k-linux.h Thu Mar 10 09:42:24 1994 *************** *** 0 **** --- 1 ---- + #include "hosts/i386linux.h" diff -cr --new-file gdb-4.12/bfd/m68klinux.c gdb-4.12.new/bfd/m68klinux.c *** gdb-4.12/bfd/m68klinux.c Wed Dec 31 19:00:00 1969 --- gdb-4.12.new/bfd/m68klinux.c Thu Mar 10 09:14:42 1994 *************** *** 0 **** --- 1,38 ---- + /* BFD back-end for linux flavored m68k a.out binaries. + Copyright (C) 1990, 1991 Free Software Foundation, Inc. + This file is part of BFD, the Binary File Descriptor library. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + + /* The reason for the text segment offset is to align things suitably + for demand paging. However, for unknown reason Linux's text segment + is offset by 1024, while the true page size is 4096. The former + is the one we care about here. + */ + #define PAGE_SIZE 1024 + #define SEGMENT_SIZE 4096 + #define TEXT_START_ADDR 0x0 + #define N_SHARED_LIB(x) 0 + #define ARCH 32 + #define BYTES_IN_WORD 4 + #include "bfd.h" + #include "sysdep.h" + #include "libbfd.h" + #include "aout/aout64.h" + #include "aout/stab_gnu.h" + #include "aout/ar.h" + #include "libaout.h" /* BFD a.out internal data structures */ + #define TARGET_IS_BIG_ENDIAN_P + #define DEFAULT_ARCH bfd_arch_m68k + #define MY(OP) CAT(m68klinux_,OP) + #define TARGETNAME "a.out-m68k-linux" + #include "aout-target.h" diff -cr --new-file gdb-4.12/bfd/targets.c gdb-4.12.new/bfd/targets.c *** gdb-4.12/bfd/targets.c Thu Feb 3 12:00:59 1994 --- gdb-4.12.new/bfd/targets.c Thu Mar 10 09:14:43 1994 *************** *** 377,382 **** --- 377,383 ---- extern bfd_target icoff_big_vec; extern bfd_target icoff_little_vec; extern bfd_target ieee_vec; + extern bfd_target m68klinux_vec; extern bfd_target m68kcoff_vec; extern bfd_target m68kcoffun_vec; extern bfd_target m68klynx_aout_vec; diff -cr --new-file gdb-4.12/gdb/config/m68k/m68k-linux.mh gdb-4.12.new/gdb/config/m68k/m68k-linux.mh *** gdb-4.12/gdb/config/m68k/m68k-linux.mh Wed Dec 31 19:00:00 1969 --- gdb-4.12.new/gdb/config/m68k/m68k-linux.mh Thu Mar 10 11:14:23 1994 *************** *** 0 **** --- 1,5 ---- + # Host: Motorola m68k running Linux + XDEPFILES= + XM_FILE= xm-linux.h + NAT_FILE= nm-linux.h + NATDEPFILES= exec.o infptrace.o inftarg.o fork-child.o coredep.o corelow.o m68klinux-nat.o diff -cr --new-file gdb-4.12/gdb/config/m68k/m68k-linux.mt gdb-4.12.new/gdb/config/m68k/m68k-linux.mt *** gdb-4.12/gdb/config/m68k/m68k-linux.mt Wed Dec 31 19:00:00 1969 --- gdb-4.12.new/gdb/config/m68k/m68k-linux.mt Thu Mar 10 09:14:44 1994 *************** *** 0 **** --- 1,3 ---- + # Target: Motorola m68k with a.out + TDEPFILES= m68k-tdep.o m68k-pinsn.o + TM_FILE= tm-linux.h diff -cr --new-file gdb-4.12/gdb/config/m68k/nm-linux.h gdb-4.12.new/gdb/config/m68k/nm-linux.h *** gdb-4.12/gdb/config/m68k/nm-linux.h Wed Dec 31 19:00:00 1969 --- gdb-4.12.new/gdb/config/m68k/nm-linux.h Thu Mar 10 11:15:01 1994 *************** *** 0 **** --- 1,31 ---- + /* Native support for linux, for GDB, the GNU debugger. + Copyright (C) 1986, 1987, 1989, 1992 Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + + #define REGISTER_U_ADDR(addr, blockend, regno) \ + (addr) = m68k_linux_register_addr ((blockend),(regno)); + + extern int + m68k_linux_register_addr PARAMS ((int, int)); + + /* Tell gdb that we can attach and detach other processes */ + #define ATTACH_DETACH + + #define U_REGS_OFFSET 0 + + #define NO_SYS_REG_H diff -cr --new-file gdb-4.12/gdb/config/m68k/tm-linux.h gdb-4.12.new/gdb/config/m68k/tm-linux.h *** gdb-4.12/gdb/config/m68k/tm-linux.h Wed Dec 31 19:00:00 1969 --- gdb-4.12.new/gdb/config/m68k/tm-linux.h Thu Mar 10 09:14:44 1994 *************** *** 0 **** --- 1,26 ---- + /* Definitions to target GDB to Linux on m680x0 + Copyright 1992, 1993 Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + + /* number of traps that happen between exec'ing the shell + * to run an inferior, and when we finally get to + * the inferior code. This is 2 on most implementations. + */ + #define START_INFERIOR_TRAPS_EXPECTED 2 + + #include "m68k/tm-m68k.h" diff -cr --new-file gdb-4.12/gdb/config/m68k/xm-linux.h gdb-4.12.new/gdb/config/m68k/xm-linux.h *** gdb-4.12/gdb/config/m68k/xm-linux.h Wed Dec 31 19:00:00 1969 --- gdb-4.12.new/gdb/config/m68k/xm-linux.h Thu Mar 10 09:14:45 1994 *************** *** 0 **** --- 1,32 ---- + /* Native support for linux, for GDB, the GNU debugger. + Copyright (C) 1986, 1987, 1989, 1992 Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + + #define HOST_BYTE_ORDER BIG_ENDIAN + + #define HAVE_TERMIOS + + /* This is the amount to subtract from u.u_ar0 + to get the offset in the core file of the register values. */ + #define KERNEL_U_ADDR 0x0 + #define PSIGNAL_IN_SIGNAL_H + + #define NEED_POSIX_SETPGID + + /* Need R_OK etc, but USG isn't defined. */ + #include <unistd.h> diff -cr --new-file gdb-4.12/gdb/configure.in gdb-4.12.new/gdb/configure.in *** gdb-4.12/gdb/configure.in Thu Feb 3 12:05:09 1994 --- gdb-4.12.new/gdb/configure.in Thu Mar 10 09:48:21 1994 *************** *** 72,77 **** --- 72,78 ---- m68*-hp-bsd*) gdb_host=hp300bsd ;; m68*-hp-hpux*) gdb_host=hp300hpux ;; m68*-isi-*) gdb_host=isi ;; + m68*-*-linux*) gdb_host=m68k-linux ;; m68*-*-lynxos*) gdb_host=m68klynx ;; m68*-motorola-*) gdb_host=delta68 ;; m68*-sony-*) gdb_host=news ;; *************** *** 243,248 **** --- 244,250 ---- m68*-*-aout*) gdb_target=m68k-em ;; m68*-*-coff*) gdb_target=m68k-em ;; m68*-*-elf*) gdb_target=m68k-em ;; + m68*-*-linux*) gdb_target=m68k-linux ;; m68*-*-lynxos*) gdb_target=m68klynx configdirs="${configdirs} gdbserver" ;; diff -cr --new-file gdb-4.12/gdb/m68klinux-nat.c gdb-4.12.new/gdb/m68klinux-nat.c *** gdb-4.12/gdb/m68klinux-nat.c Wed Dec 31 19:00:00 1969 --- gdb-4.12.new/gdb/m68klinux-nat.c Thu Mar 10 11:28:56 1994 *************** *** 0 **** --- 1,80 ---- + /* Motorola m68k native support for Linux + Copyright (C) 1994 Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + + #include "defs.h" + #include "frame.h" + #include "inferior.h" + #include "language.h" + #include "gdbcore.h" + + #include <sys/types.h> + + #include <sys/param.h> + #include <sys/dir.h> + #include <signal.h> + #include <sys/user.h> + #include <sys/ioctl.h> + #include <fcntl.h> + + #include <sys/file.h> + #include <sys/stat.h> + + #ifndef NO_SYS_REG_H + #include <sys/reg.h> + #endif + + #include "ieee-float.h" + + #include "target.h" + + + /* this table must line up with REGISTER_NAMES in tm-m68k.h */ + static int regmap[] = + { + PT_D0, PT_D1, PT_D2, PT_D3, PT_D4, PT_D5, PT_D6, PT_D7, + PT_A0, PT_A1, PT_A2, PT_A3, PT_A4, PT_A5, PT_A6, PT_USP, + PT_SR, PT_PC + }; + + /* blockend is the value of u.u_ar0, and points to the + * place where GS is stored + */ + + int + m68k_linux_register_addr (blockend, regnum) + int blockend; + int regnum; + { + #if 0 + /* this will be needed if fp registers are reinstated */ + /* for now, you can look at them with 'info float' + */ + if (regnum >= FP0_REGNUM && regnum <= FP7_REGNUM) + { + int ubase, fpstate; + struct user u; + ubase = blockend + 4 * (SS + 1) - KSTKSZ; + fpstate = ubase + ((char *)&u.u_fpstate - (char *)&u); + return (fpstate + 0x1c + 10 * (regnum - FP0_REGNUM)); + } + else + #endif + return (blockend + 4 * regmap[regnum]); + + } diff -cr --new-file gdb-4.12/readline/readline.c gdb-4.12.new/readline/readline.c *** gdb-4.12/readline/readline.c Thu Feb 3 11:47:49 1994 --- gdb-4.12.new/readline/readline.c Thu Mar 10 09:14:46 1994 *************** *** 57,63 **** /* System V machines use termio. */ #if !defined (_POSIX_VERSION) ! # if defined (USG) || defined (hpux) || defined (Xenix) || defined (sgi) || defined (DGUX) || defined (__H3050R) || defined (__H3050RX) # undef NEW_TTY_DRIVER # define TERMIO_TTY_DRIVER # include <termio.h> --- 57,63 ---- /* System V machines use termio. */ #if !defined (_POSIX_VERSION) ! # if defined (USG) || defined (hpux) || defined (Xenix) || defined (sgi) || defined (DGUX) || defined (__H3050R) || defined (__H3050RX) || defined (linux) # undef NEW_TTY_DRIVER # define TERMIO_TTY_DRIVER # include <termio.h>